import { Component, Input, OnInit } from '@angular/core';
import { FileObjectConfigDto, FileUploadServiceProxy } from "@shared/service-proxies/service-proxies";
import { MessageService } from 'abp-ng2-module';

@Component({
    selector: 'batch-upload',
    templateUrl: './batch-upload.component.html'
})
export class BatchUploadComponent implements OnInit {

    @Input() displayName: string;
    @Input() customKey: string;      
    @Input() contentId: string;
    @Input() autoSyncBySelf: boolean;      // 编辑表单上是否显示自动同步的勾选框

    @Input() ctrlDisabled: boolean;

    @Input() refreshValue: string;  // 刷新请求
    @Input() isTemporary: boolean = false;

    templateData: FileObjectConfigDto[] = [];

    constructor(
        private _fileUploadServiceProxy: FileUploadServiceProxy) {

    }
    ngOnInit(): void {
        this._fileUploadServiceProxy.getConfigInfo(undefined, this.customKey)
            .subscribe(result => {
                this.templateData = result;
        });
    }

}
